package com.itheima.stock.mapper;

import com.itheima.stock.common.domain.StockBlockDomain;
import com.itheima.stock.pojo.StockBlockRtInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
* @author 呱呱
* @description 针对表【stock_block_rt_info(股票板块详情信息表)】的数据库操作Mapper
* @createDate 2022-05-30 15:45:59
* @Entity com.itheima.stock.pojo.StockBlockRtInfo
*/
public interface StockBlockRtInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockBlockRtInfo record);

    int insertSelective(StockBlockRtInfo record);

    StockBlockRtInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockBlockRtInfo record);

    int updateByPrimaryKey(StockBlockRtInfo record);

    /**
     * 查询指定时间点下板块的数据且按照交易金额降序写前十
     *
     * @param timePoint 时间点
     * @return {@link List}<{@link StockBlockDomain}>
     */
    List<StockBlockDomain> sectorAllLimit(@Param("timePoint") Date timePoint,
                                          @Param("limitNumber") Integer limitNumber);

    /**
     * 批量插入板块数据
     *
     * @param stockBlockRtInfos 股票块rt信息
     * @return int
     */
    int insertBatch(@Param("infos") List<StockBlockRtInfo> stockBlockRtInfos);
}
